package com.zyg.service.impl;

import com.zyg.dao.AccountDao;
import com.zyg.service.AccountService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("accountService")
public class AccountServiceImpl implements AccountService{

	@Autowired
	private AccountDao accountDao;
	
	@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,readOnly = false)
	public void transfer(String outUser,String inUser,Double money) throws Exception{

		accountDao.transfer(outUser,inUser,money);
	}
}
